package cn.hsw.manage.center.mapper;

import cn.hsw.manage.center.entity.UserRoleCenter;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserRoleCenterMapper extends BaseMapper<UserRoleCenter> {
    @Delete("delete from hsw_manage_user_role where user_pid = #{userPid}")
    void deleteByUserPid(@Param("userPid")Long userPid);

    @Select("select count(1) from hsw_manage_user_role where role_pid = #{rolePid} ")
    Integer countByRolePid(@Param("rolePid")Long rolePid);
}
